<?php
namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Config;

class FundController extends CommonController
{

//    private $order = new Order();

    public function __construct()
    {
        parent::__construct();
        $this->checkLogin();
    }

    /**
     * 商品回收积分详情
     */
    public function kjpay_withdrawal(Request $request){
        if($request->isMethod('post')){
            $data = $post = $request->all();
            $data['_cmd'] = 'admin_kjpay_withdrawal';
            $data['ticket'] = '';
            //提交数据给接口
            $result = $this->api_post($data);
            if($result['status'] == '1') {
                //记录文件日志
                record_action(AdminAction::getNextSeq(),'Fund','kjpay_withdrawal','易币支付提现',json_encode($post));
            }
            return response()->json($result);
        }
        return view('admin.fund.kjpay_withdrawal');
    }
}
